package com.vecspace.jsmodel;

import java.util.List;

/**
 * 
 * @version 1.0
 * @author wanghua
 */
public class ATreeNode {
	private String style;
	private boolean checkable;
	private boolean disableCheckbox;
	private boolean disabled;
	private String icon;
	private boolean isLeaf;
	private String key;
	private boolean selectable = true;
	private String title;
	private List<ATreeNode> children;
	
	public ATreeNode() {
		
	}
	
	/**
	 *  默认 isLeaf = false;selectable=true
	 * @param key 一般是id或者前缀+id
	 * @param title
	 */
	public ATreeNode(String key, String title) {
		this.key = key;
		this.title = title;
	}

	/**
	 *  默认selectable=true
	 * @param key 一般是id或者前缀+id
	 * @param title
	 * @param isLeaf
	 */
	public ATreeNode(String key, String title, boolean isLeaf) {
		this.key = key;
		this.title = title;
		this.isLeaf = isLeaf;
	}
	
	public String getStyle() {
		return style;
	}
	public void setStyle(String style) {
		this.style = style;
	}
	public boolean isCheckable() {
		return checkable;
	}
	public void setCheckable(boolean checkable) {
		this.checkable = checkable;
	}
	public boolean isDisableCheckbox() {
		return disableCheckbox;
	}
	public void setDisableCheckbox(boolean disableCheckbox) {
		this.disableCheckbox = disableCheckbox;
	}
	public boolean isDisabled() {
		return disabled;
	}
	public void setDisabled(boolean disabled) {
		this.disabled = disabled;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public boolean getIsLeaf() {
		return isLeaf;
	}
	public void setIsLeaf(boolean isLeaf) {
		this.isLeaf = isLeaf;
	}
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public boolean isSelectable() {
		return selectable;
	}
	public void setSelectable(boolean selectable) {
		this.selectable = selectable;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public List<ATreeNode> getChildren() {
		return children;
	}
	public void setChildren(List<ATreeNode> children) {
		this.children = children;
	}
}
